
#include "ProductButton.h"
#include "ProductButtonSpring.h"
#include "ProductButtonSummer.h"
#include "ProductComboBox.h"
#include "ProductComboBoxSpring.h"
#include "ProductComboBoxSummer.h"
#include "ProductTextField.h"
#include "ProductTextFieldSpring.h"
#include "ProductTextFieldSummer.h"
#include "SkinFactory.h"
#include "SkinFactorySpring.h"
#include "SkinFactorySummer.h"
#include <memory>

using namespace npAbstractFactory;
using namespace std;


void doAbstractFactory()
{
    unique_ptr<SkinFactory> factory(new SkinFactorySpring());
    unique_ptr<ProductButton> button(factory->createButton());
    unique_ptr<ProductComboBox> combobox(factory->createComboBox());
    unique_ptr<ProductTextField> textfield(factory->createTextField());
    button->display();
    combobox->display();
    textfield->display();

    unique_ptr<SkinFactory> factory2(new SkinFactorySummer());
    unique_ptr<ProductButton> button2(factory2->createButton());
    unique_ptr<ProductComboBox> combobox2(factory2->createComboBox());
    unique_ptr<ProductTextField> textfield2(factory2->createTextField());
    button2->display();
    combobox2->display();
    textfield2->display();
}